package com.lori.netshop.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lori.netshop.service.RedisService;
import com.lori.netshop.util.NetshopResult;

@Controller
public class RedisController {
	//注入redisservice
	@Autowired
	private RedisService redisServiceimp;
	@RequestMapping("/content/delCache/{categoryId}")
	@ResponseBody
	public NetshopResult delCache(@PathVariable Long categoryId){
		return redisServiceimp.hdel(categoryId+"");
	}
}
